<template>
  <div id="fans_main">  
 
    <div class="rightBox">
      <div class="btn_group">
        <button
          :class="{ active: input_btn == '粉丝榜' }"
          @click="input_btn = '粉丝榜'"
        >
          粉丝榜
        </button>
        <!-- <button
          :class="{ active: input_btn == '行业排行榜' }"
          @click="input_btn = '行业排行榜'"
        >
          行业排行榜
        </button> -->
        <button
          :class="{ active: input_btn == '地区排行榜' }"
          @click="input_btn = '地区排行榜'"
        >
          地区排行榜
        </button>
        <button
          :class="{ active: input_btn == '蓝V认证榜' }"
          @click="input_btn = '蓝V认证榜'"
        >
          蓝V认证榜
        </button>
      </div>
      <div class="rightBox-content">
        <Fans v-if="input_btn == '粉丝榜'" />
        <!-- <Ranking v-if="input_btn == '行业排行榜'" /> -->
        <RankingCity v-if="input_btn == '地区排行榜'" />
        <Bluev v-if="input_btn == '蓝V认证榜'" />
      </div>
    </div>
  </div>
</template>

<script>
import Fans from './fans'
// import Ranking from './ranking'
import RankingCity from './rankingCity'
import Bluev from './blue_v'
export default {
  name: 'fans_main',
  components: {
    // Ranking,
    Bluev,
    Fans,
    RankingCity,
  },
   watch: {
input_btn(newvalue) {
      if (newvalue == '粉丝榜') {
        document.title = "粉丝榜-直播电商数据分析&智能分析服务平台-掌上精选";
      } else if (newvalue == '行业排行榜') {
        document.title = "行业排行榜-直播电商数据分析&智能分析服务平台-掌上精选";
      }else if (newvalue == '地区排行榜') {
        document.title = "地区排行榜-直播电商数据分析&智能分析服务平台-掌上精选";
      }
       else {
        document.title = "蓝v认证榜-直播电商数据分析&智能分析服务平台-掌上精选";
      }
    },
  },

  data() {
    return {
     input_btn: "粉丝榜",
    }
  },
  created() {
       document.title = "粉丝榜-直播电商数据分析&智能分析服务平台-掌上精选";
    if (this.$route.params.id) this.input_btn = this.$route.params.id
  },
  mounted() {
    this.showtabs()
  },
  methods: {
    showtabs() {
      if (this.$route.query.input_btn != null) {
        this.input_btn = this.$route.query.input_btn
      }
    },
  },
}
</script>
<style scoped lang='less'>
#fans_main {
 
  height: fit-content;
 

  margin-top:@margin-num;
  margin-left: @margin-num;
  margin-right: @margin-num;

  min-height: 100vh;
   .rightBox {
  
    -webkit-box-sizing: border-box;
    box-sizing: border-box;

    height: 100%;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    border-radius: 6px;
    .btn_group {
      .active {
        background-color: #fd7f2c;
        color: #ffffff !important;
      }
      button {
        font-size: 14px;
        color: #555;
        padding-left: 23px;
        padding-right: 23px;
        height: 40px;
        background-color: #fff;
        border-radius: 4px;
        margin-right: 7px;
        font-weight: 600;
      }
      button:hover{
          color: #ff924b;
      }
    }
  }
  .rightBox-content {
    background-color: #ffffff;
    border-radius: 6px;
    padding: 20px;
    margin-top: 10px;
    padding-bottom: 0;
  }
  
}
</style>
